Skip to main content

RCS Single Message API

The RCS Single Message API allows businesses to send an RCS Rich Card message to a single end user using their RCS Business account. The card content — title, description, media, and suggestion buttons — is defined directly in the request body.


Prerequisites
  1. RCS Business Account: Share your business details with the Msgkart team so they can enable RCS messaging on your behalf.

  2. Tenant ID: A valid Msgkart Tenant ID / Business ID.

  3. API Key: An active API key provided by Msgkart, sent in the request headers as x-api-key.


Request Syntax​

POST /api/v3/message/{tenantId}/rcs/single

Request Headers​

x-api-key: <API KEY>
Content-Type: application/json

Request Body​

note

You don't need to build this request body by hand. In the Msgkart portal, open the RCS Template page. A Copy button next to the template Preview copies the ready-to-use request body for the Single Message API.

{
"version": "1.0",
"richCard": {
"standaloneCard": {
"cardOrientation": "VERTICAL",
"cardContent": {
"title": "{{title}}",
"description": "{{description}}",
"media": {
"contentInfo": {
"fileUrl": "{{fileUrl}}"
},
"height": "MEDIUM"
},
"suggestions": [
{
"action": {
"text": "{{text}}",
"postbackData": "{{postbackData}}",
"openUrlAction": {
"url": "{{url}}",
"application": "BROWSER"
}
}
}
]
}
}
},
"rcsMessageType": "RICHCARD_STANDALONE",
"phone": "{{phone}}"
}

Response Body​

{
"messageId": "rcs-5e2a9c41-bd7-8f1e-91b8f2d9a0ef"
}

Properties​

PropertyTypeRequiredDescription
versionstringYesPayload version (e.g. "1.0").
rcsMessageTypestringYesType of RCS message (e.g. "RICHCARD_STANDALONE").
phonestringYesRecipient phone number with country code, without leading + (e.g. "919999999999").
richCard.standaloneCard.cardOrientationstringYesOrientation of the card (e.g. "VERTICAL").
cardContent.titlestringYesTitle text displayed on the Rich Card.
cardContent.descriptionstringYesBody text displayed on the Rich Card. Supports Unicode (e.g. Hindi).
cardContent.media.contentInfo.fileUrlstringNoPublic URL of the image shown on the card.
cardContent.media.heightstringNoHeight of the media on the card (e.g. "MEDIUM").
cardContent.suggestionsarrayNoSuggestion buttons shown below the card. Can be an empty array.
suggestions[].action.textstringNoButton label.
suggestions[].action.postbackDatastringNoData sent back to your webhook when the button is tapped.
suggestions[].action.openUrlAction.urlstringNoURL opened when the button is tapped.
suggestions[].action.openUrlAction.applicationstringNoWhere the URL opens (e.g. "BROWSER").

Examples​

Example 1: Rich Card with a URL Button (cURL)​

curl --location 'https://alb-backend.msgkart.com/api/v3/message/<TENANT ID>/rcs/single' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <API KEY>' \
--data '{
"version": "1.0",
"richCard": {
"standaloneCard": {
"cardOrientation": "VERTICAL",
"cardContent": {
"title": "CreditSaison",
"description": "प्रिय hari, आपकी ₹99999 की ईएमआई 1234 को देय थी और अभी तक भुगतान नहीं किया गया है। विलंब शुल्क से बचने के लिए कृपया आज ही भुगतान करें। यदि पहले ही भुगतान कर दिया है, तो इस संदेश को अनदेखा करें।",
"suggestions": [
{
"action": {
"text": "Pay Now",
"postbackData": "Pay Now",
"openUrlAction": {
"url": "https://msgkart.in",
"application": "BROWSER"
}
}
}
]
}
}
},
"rcsMessageType": "RICHCARD_STANDALONE",
"phone": "919999999999"
}'

Example 2: Rich Card with an Image (cURL)​

curl --location 'https://alb-backend.msgkart.com/api/v3/message/<TENANT ID>/rcs/single' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <API KEY>' \
--data '{
"version": "1.0",
"richCard": {
"standaloneCard": {
"cardOrientation": "VERTICAL",
"cardContent": {
"title": "Welcome to Msgkart 👋",
"description": "Looking for a loan or need help with your finances? Choose an option below to get started.",
"media": {
"contentInfo": {
"fileUrl": "https://media.msgkart.com/107698525673716/ba11da14e2194c3caad72be200449b10.png"
},
"height": "MEDIUM"
},
"suggestions": []
}
}
},
"rcsMessageType": "RICHCARD_STANDALONE",
"phone": "919999999999"
}'